package com.cloud.model;

import com.cloud.base.BaseEntity;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

@Entity
@Table(name = "tb_school")
@EntityListeners(AuditingEntityListener.class)
public class School extends BaseEntity{
    private String description;
    private String imgName;
    private String imgUrl;
    @OneToMany(mappedBy = "school",cascade = {CascadeType.MERGE,CascadeType.PERSIST})
    private Set<Class> classSet=new HashSet<>();

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getImgName() {
        return imgName;
    }

    public void setImgName(String imgName) {
        this.imgName = imgName;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public Set<Class> getClassSet() {
        return classSet;
    }

    public void setClassSet(Set<Class> classSet) {
        this.classSet = classSet;
    }
}
